# coding=utf-8
from celery.result import AsyncResult
from celery_tasks.celery_main import app

async_result = AsyncResult(id="98c3f031-b25a-44bc-87db-e67af2ab1d9f", app=app)
if async_result.successful():
    result = async_result.get()
    print(result)
elif async_result.failed():
    print("执行失败")
elif async_result.status == "PENDING":
    print("任务等待中")
elif async_result.status == "RETRY":
    print("任务异常后正在重试")
elif async_result.status == "STARTED":
    print("任务已经开始被执行")